from .libmoops import verbose_print

has_qt = False
has_web = False

try:
    from .gui import run as run_gui
    has_qt = True
except ImportError:
    pass
try:
    from .web import run as run_web
    has_web = True
except ImportError:
    pass

ui_type = libmoops.config.get('global','ui').lower()
if has_qt and ui_type == 'qt':
    verbose_print("Selected Qt ui...")
    run = run_gui
elif has_web and ui_type == 'web':
    verbose_print("Selected web ui...")
    run = run_web
else:
    raise ValueError("UI of type %s not valid!"%ui_type)
